package com.naiterui.ehp.bs.b2c.address.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 省市区表
 *
 * @author guoyongxiang 2019-01-12
 */
@Data
@Entity
@NoArgsConstructor
@Table(name = "cms_city")
public class City implements Serializable {

    private static final long serialVersionUID = 7102920433425480617L;
    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    /**
     * 省 市 区 名称
     */
    @Column(name = "name")
    private String name;

    /**
     * 省市区全名
     */
    @Column(name = "full_name")
    private String fullName;

    /**
     * 类型:0:全国 1:省 2;市 3:区
     */
    @Column(name = "type")
    private Integer type;

    /**
     * 父类id
     */
    @Column(name = "parent_id")
    private Long parentId;

    /**
     * 是否有效0无效，1有效
     */
    @Column(name = "available")
    private Integer available;

    /**
     * parent_name
     */
    @Column(name = "parent_name")
    private String parentName;

    /**
     * 直辖市 0：不是；1：是
     */
    @Column(name = "municipality")
    private Integer municipality;

    /**
     * 权重 0：默认权重
     */
    @Column(name = "weight")
    private Integer weight;

    /**
     * 是否热门城市 0：否 1：是 用于代发货项目
     */
    @Column(name = "hot")
    private Integer hot;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 乐观锁
     */
    @Version
    private Integer version;

}
